//
//  JingDianMapCell.m
//  IYLM
//
//  Created by Jian-Ye on 12-11-8.
//  Copyright (c) 2012年 Jian-Ye. All rights reserved.
//

#import "JingDianMapCell.h"
#import "UIImageView+WebCache.h"
#import "Place.h"

@implementation JingDianMapCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setContent:(Place *)place
{
    _to = place;
    [_imageView setImageWithURL:[NSURL URLWithString:place.logo]];
    _titleLabel.text = place.name;
    _descriptionLabel.text = place.description;
    [_titleLabel autoHeight];
    
    _descriptionLabel.top = _titleLabel.bottom_1;
    [_descriptionLabel autoHeight];
}

- (IBAction)touchAction:(id)sender
{
    if (_delegate) {
        [_delegate annotationAction:self];
    }
}

@end
